package com.zim.analysis;

import com.zim.analysis.dto.BaseAnlysisDTO;

public interface IAnalysis {
    /**
     * 数据解析
     * 正确返回解析数据对象
     * 错误抛出异常
     * @param bytes
     * @return object GpsPO | AckPO | PhotoPO
     * @throws Exception
     */
     BaseAnlysisDTO anlysis(byte[] bytes) throws Exception;
     /**
      * 心跳检查
      * @param terminal
      * @return
      * @throws Exception
      */
     byte[] heartBeat(String terminal) throws Exception;
     
     /**
      * 升级
      * ftp:120.79.31.177,21,cheji,cheji
      * @param terminal
      * @param version
      * @param ftp
      * @return
      */
     byte[] update(String terminal,String version,String ftp) throws Exception;
     
     /**
      * 开落锁
      * @param terminal
      * @param bool
      * @return
      * @throws Exception
      */
     byte[] lock(String terminal,boolean bool) throws Exception;
     
     /**
      * 点熄火
      * @param terminal
      * @param bool
      * @return
      * @throws Exception
      */
     byte[] ignite(String terminal,boolean bool) throws Exception;
     
     /**
      * 鸣笛
      * @param terminal
      * @param bool
      * @return
      * @throws Exception
      */
     byte[] whistle(String terminal,boolean bool) throws Exception;
     
     /**
      * 蓝牙初始化
      * @param terminal
      * @return
      * @throws Exception
      */
     byte[] initBluetooth(String terminal) throws Exception;
     
     /**
      * 修改蓝牙密码
      * @param terminal
      * @param password
      * @return
      * @throws Exception
      */
     byte[] password(String terminal,String password) throws Exception;
     
     /**
      * 拍照
      * @param terminal
      * @return
      * @throws Exception
      */
     byte[] photo(String terminal) throws Exception;
     
     /**
      * 长租和车型切换
      * @param terminal
      * @param type
      * @return
      * @throws Exception
      */
     byte[] rent(String terminal,int type) throws Exception;
     
     /**
      * 更改mqtt登录秘钥
      * @param terminal
      * @param productKey
      * @param secret
      * @return
      * @throws Exception
      */
     byte[] secret(String terminal,String productKey,String secret) throws Exception;
}
